
;--- -pe format test
;--- this is a dll - uses exports and relocations

	.386
	.model flat, stdcall	;-pe requires a .model flat directive

IMAGE_FILE_RELOCS_STRIPPED  EQU 0001h
IMAGE_FILE_DLL              EQU 2000h

;--- reset and set bits in file flags
@pe_file_flags = @pe_file_flags and not IMAGE_FILE_RELOCS_STRIPPED
@pe_file_flags = @pe_file_flags or      IMAGE_FILE_DLL

;--- define 2 import directories
ifdef __JWASM__
	option dllimport:<kernel32.dll>
endif
GetStdHandle proto :dword
ifdef __JWASM__
	option dllimport:none
endif

	.code

Export1 proc export
	invoke GetStdHandle, -11
	ret
Export1 endp

LibMain proc hModule:dword, dwReason:dword, dwReserved:dword
	mov eax,1
	ret
LibMain endp

	END LibMain
